package com.wy.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

/**
 * @描述
 * @创建人 wangyue
 * @创建时间2019/12/411:34
 */

@RestController
@RequestMapping("ribbon")
public class RibbonController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("list")
    public List<Room> list(){
        List<Room> list = restTemplate.getForObject("http://wycloud-zk1/room/list", List.class);
        return list;
    }
}
